﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace MINERP.MobileMsgSend.Forms
{
    public partial class FrmLinxiren : Form
    {
        public FrmLinxiren()
        {
            InitializeComponent();
        }
        public delegate void PassString(List<string> str);
        public event PassString PassTelStr;

        private void simpleButtonOk_Click(object sender, EventArgs e)
        {

            string allStr = richTextBoxTel.Text.Trim();
            List<string> strList = new List<string>();
            string[] telArray = allStr.Split(',');
            foreach (string tel in telArray)
            {
                if (!string.IsNullOrEmpty(tel))
                {
                    strList.Add(tel);
                }
                
            }
            PassTelStr(strList);
             this.Close();
           //string tel= textEditTel.Text.Trim();
           //if (tel.Length == 11)
           //{
           //    PassTelStr(textEditName.Text + "|" + tel);
           //    this.Close();
           //}
           //else
           //{
           //    MessageBox.Show("手机号码位数不对", "确定", MessageBoxButtons.OK, MessageBoxIcon.Question);
 
           //}
           
        }

        private void richTextBoxTel_KeyPress(object sender, KeyPressEventArgs e)
        {
            if (Char.IsDigit(e.KeyChar) || e.KeyChar == (char)44)
            {

            }
            else
            {
                e.Handled = true;
            }
        }

       
    }
}
